package P42;

public class User {
    private int id;
    private String name;
    private String password;
    private char gender;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        if(id<0){
            System.out.println("id不符合规范");
        }
        else{
            this.id = id;
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }
}
